package com.luyuan.crm.member.model;

import java.util.Date;

import com.ruijie.foundation.bo.EntityObject;

public class MemberCoupon extends EntityObject<String> implements Comparable<MemberCoupon> {

    /**	
     * Member Description
     */
    private static final long serialVersionUID = 1L;

    private Member member;

    /**
     * 购物卷类型
     */
    private MemberCouponType couponType;

    /**
     * 金额
     */
    private int amount;

    private Date createTime;

    /**
     * 到期时间
     */
    private Date expirationTime;

    public MemberCouponType getCouponType() {
        return couponType;
    }

    public void setCouponType(MemberCouponType couponType) {
        this.couponType = couponType;
    }

    public int getAmount() {
        return amount;
    }

    public void setAmount(int amount) {
        this.amount = amount;
    }

    public Member getMember() {
        return member;
    }

    public void setMember(Member member) {
        this.member = member;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getExpirationTime() {
        return expirationTime;
    }

    public void setExpirationTime(Date expirationTime) {
        this.expirationTime = expirationTime;
    }

    @Override
    public int compareTo(MemberCoupon o) {
        if (getCouponType() == o.getCouponType()) {
            return getCreateTime().compareTo(o.getCreateTime());
        }
        return getCouponType().compareTo(o.getCouponType());
    }
}
